<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dranouter Game | Backoffice</title>
<style type="text/css">
<!--
.opmaakTitle {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
}
.opmaakTitle strong {
	font-size: 24px;
	font-weight: bold;
}
.rowHeader {
	text-align: center;
	font-family: Verdana, Geneva, sans-serif;
}
.rowHeader td {
	font-size: 12px;
}
.rowHeader td {
	font-weight: bold;
}
.tableRow {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
}
.greenBericht {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	color: #060;
	font-weight: bold;
}
-->
</style>
</head>

<body>
<h1 class="opmaakTitle"><strong>Online Game Backoffice</strong></h1>
<p class="greenBericht"><?php echo $message; ?></p>
<?php echo form_open('backoffice/command'); ?>
    <button type="submit" id="sendMails" name="sendMails" value="clicked">Herinnering Verzenden</button>
<?php echo form_close(); ?>
<h3 class="opmaakTitle">Top 10:</h3>
<table width="849" border="1">
  <tr class="rowHeader">
    <td width="42">ID</td>
    <td width="234">Naam</td>
    <td width="317">Email</td>
    <td width="132">Emails Ontvangen</td>
    <td width="90">Score</td>
  </tr>
  
  <?php	$count = 0;
  
  		if($topResults!=null){ 
		foreach($topResults->result() as $row): ?>
  
	  <tr class="tableRow">
	    <td align="center"><?php $count++; echo $count; ?></td>
	    <td><?php echo $row->Naam; ?></td>
	    <td><?php echo $row->Email; ?></td>
	    <td align="center"><?php echo $row->EmailsOntvangen; ?></td>
	    <td align="center"><?php echo $row->Score; ?></td>
	  </tr>
  
  <?php endforeach; } ?>
  
</table>

<h3 class="opmaakTitle">Volledige uitslag:</h3>

<?php echo form_open('backoffice/remove'); ?>
   
<table border="1">
  <tr class="rowHeader">
    <td width="42">Plaats</td>
    <td width="234">Naam</td>
    <td width="317">Email</td>
    <td width="132">Emails Ontvangen</td>
    <td width="90">Score</td>
    <td>Acties</td>
  </tr>
  
  <?php	$count = 0;
  
  		if($allResults!=null){ 
		foreach($allResults->result() as $row): ?>
  
	  <tr class="tableRow">
	    <td align="center"><?php $count++; echo $count; ?></td>
	    <td><?php echo $row->Naam; ?></td>
	    <td><?php echo $row->Email; ?></td>
	    <td align="center"><?php echo $row->EmailsOntvangen; ?></td>
	    <td align="center"><?php echo $row->Score; ?></td>
	    <td><button type="submit" id="removeScore" name="removeScore" value="<?php echo $row->ID; ?>">verwijderen</button></td>
	  </tr>
  
  <?php endforeach; } ?>
  
</table>

<?php echo form_close(); ?>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
